package com.jh.complicate.io.bio;

import java.io.OutputStream;
import java.net.Socket;
import java.util.UUID;

/**
 * @author Administrator
 * @projectName newforward
 * @title BIOClient.java
 * @package com.jh.complicate.io.bio
 * @description BIO客户端
 * @date 2019/6/16 23:16
 */
public class BIOClient {
    public static void main(String[] args) {
        try {
            Socket client = new Socket("localhost", 8080);
            OutputStream output = client.getOutputStream();
            String content = UUID.randomUUID().toString();
            output.write(content.getBytes());
            output.flush();
            client.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
